package cn.eastseven.netserver;

import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolDecoderOutput;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
public class SimpleDecoder implements ProtocolDecoder {

	private static final Logger log = LoggerFactory.getLogger(SimpleDecoder.class);
	
	public void decode(IoSession session, IoBuffer in, ProtocolDecoderOutput out) throws Exception {
		log.debug("decode: sessionId={}", session.getId());
	}

	public void finishDecode(IoSession session, ProtocolDecoderOutput out) throws Exception {
		log.debug("finishDecode: sessionId={}", session.getId());
	}

	public void dispose(IoSession session) throws Exception {
		log.debug("dispose: sessionId={}", session.getId());
	}

}
